.class public Lcom/vividsolutions/jts/geomgraph/GeometryGraph;
.super Lcom/vividsolutions/jts/geomgraph/PlanarGraph;
.source "GeometryGraph.java"


# instance fields
.field private argIndex:I

.field private boundaryNodeRule:Lcom/vividsolutions/jts/algorithm/BoundaryNodeRule;

.field private boundaryNodes:Ljava/util/Collection;

.field private hasTooFewPoints:Z

.field private invalidPoint:Lcom/vividsolutions/jts/geom/Coordinate;

.field private lineEdgeMap:Ljava/util/Map;

.field private parentGeom:Lcom/vividsolutions/jts/geom/Geometry;

.field private useBoundaryDeterminationRule:Z


# direct methods
.method public constructor <init>(ILcom/vividsolutions/jts/geom/Geometry;Lcom/vividsolutions/jts/algorithm/BoundaryNodeRule;)V
    .locals 2

    .line 123
    invoke-direct {p0}, Lcom/vividsolutions/jts/geomgraph/PlanarGraph;-><init>()V

    .line 88
    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    iput-object v0, p0, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->lineEdgeMap:Ljava/util/Map;

    const/4 v0, 0x0

    .line 90
    iput-object v0, p0, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->boundaryNodeRule:Lcom/vividsolutions/jts/algorithm/BoundaryNodeRule;

    const/4 v1, 0x1

    .line 96
    iput-boolean v1, p0, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->useBoundaryDeterminationRule:Z

    const/4 v1, 0x0

    .line 99
    iput-boolean v1, p0, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->hasTooFewPoints:Z

    .line 100
    iput-object v0, p0, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->invalidPoint:Lcom/vividsolutions/jts/geom/Coordinate;

    .line 124
    iput p1, p0, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->argIndex:I

    .line 125
    iput-object p2, p0, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->parentGeom:Lcom/vividsolutions/jts/geom/Geometry;

    .line 126
    iput-object p3, p0, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->boundaryNodeRule:Lcom/vividsolutions/jts/algorithm/BoundaryNodeRule;

    if-eqz p2, :cond_0

    .line 130
    invoke-direct {p0, p2}, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->add(Lcom/vividsolutions/jts/geom/Geometry;)V

    :cond_0
    return-void
.end method

.method private add(Lcom/vividsolutions/jts/geom/Geometry;)V
    .locals 2

    .line 191
    invoke-virtual {p1}, Lcom/vividsolutions/jts/geom/Geometry;->isEmpty()Z

    move-result v0

    if-eqz v0, :cond_0

    return-void

    .line 195
    :cond_0
    instance-of v0, p1, Lcom/vividsolutions/jts/geom/MultiPolygon;

    if-eqz v0, :cond_1

    const/4 v1, 0x0

    .line 196
    iput-boolean v1, p0, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->useBoundaryDeterminationRule:Z

    .line 198
    :cond_1
    instance-of v1, p1, Lcom/vividsolutions/jts/geom/Polygon;

    if-eqz v1, :cond_2

    check-cast p1, Lcom/vividsolutions/jts/geom/Polygon;

    invoke-direct {p0, p1}, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->addPolygon(Lcom/vividsolutions/jts/geom/Polygon;)V

    goto :goto_0

    .line 200
    :cond_2
    instance-of v1, p1, Lcom/vividsolutions/jts/geom/LineString;

    if-eqz v1, :cond_3

    check-cast p1, Lcom/vividsolutions/jts/geom/LineString;

    invoke-direct {p0, p1}, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->addLineString(Lcom/vividsolutions/jts/geom/LineString;)V

    goto :goto_0

    .line 201
    :cond_3
    instance-of v1, p1, Lcom/vividsolutions/jts/geom/Point;

    if-eqz v1, :cond_4

    check-cast p1, Lcom/vividsolutions/jts/geom/Point;

    invoke-direct {p0, p1}, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->addPoint(Lcom/vividsolutions/jts/geom/Point;)V

    goto :goto_0

    .line 202
    :cond_4
    instance-of v1, p1, Lcom/vividsolutions/jts/geom/MultiPoint;

    if-eqz v1, :cond_5

    check-cast p1, Lcom/vividsolutions/jts/geom/MultiPoint;

    invoke-direct {p0, p1}, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->addCollection(Lcom/vividsolutions/jts/geom/GeometryCollection;)V

    goto :goto_0

    .line 203
    :cond_5
    instance-of v1, p1, Lcom/vividsolutions/jts/geom/MultiLineString;

    if-eqz v1, :cond_6

    check-cast p1, Lcom/vividsolutions/jts/geom/MultiLineString;

    invoke-direct {p0, p1}, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->addCollection(Lcom/vividsolutions/jts/geom/GeometryCollection;)V

    goto :goto_0

    :cond_6
    if-eqz v0, :cond_7

    .line 204
    check-cast p1, Lcom/vividsolutions/jts/geom/MultiPolygon;

    invoke-direct {p0, p1}, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->addCollection(Lcom/vividsolutions/jts/geom/GeometryCollection;)V

    goto :goto_0

    .line 205
    :cond_7
    instance-of v0, p1, Lcom/vividsolutions/jts/geom/GeometryCollection;

    if-eqz v0, :cond_8

    check-cast p1, Lcom/vividsolutions/jts/geom/GeometryCollection;

    invoke-direct {p0, p1}, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->addCollection(Lcom/vividsolutions/jts/geom/GeometryCollection;)V

    :goto_0
    return-void

    .line 206
    :cond_8
    new-instance v0, Ljava/lang/UnsupportedOperationException;

    invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;

    move-result-object p1

    invoke-virtual {p1}, Ljava/lang/Class;->getName()Ljava/lang/String;

    move-result-object p1

    invoke-direct {v0, p1}, Ljava/lang/UnsupportedOperationException;-><init>(Ljava/lang/String;)V

    throw v0
.end method

.method private addCollection(Lcom/vividsolutions/jts/geom/GeometryCollection;)V
    .locals 2

    const/4 v0, 0x0

    .line 211
    :goto_0
    invoke-virtual {p1}, Lcom/vividsolutions/jts/geom/GeometryCollection;->getNumGeometries()I

    move-result v1

    if-ge v0, v1, :cond_0

    .line 212
    invoke-virtual {p1, v0}, Lcom/vividsolutions/jts/geom/GeometryCollection;->getGeometryN(I)Lcom/vividsolutions/jts/geom/Geometry;

    move-result-object v1

    .line 213
    invoke-direct {p0, v1}, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->add(Lcom/vividsolutions/jts/geom/Geometry;)V

    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    :cond_0
    return-void
.end method

.method private addLineString(Lcom/vividsolutions/jts/geom/LineString;)V
    .locals 7

    .line 274
    invoke-virtual {p1}, Lcom/vividsolutions/jts/geom/LineString;->getCoordinates()[Lcom/vividsolutions/jts/geom/Coordinate;

    move-result-object v0

    invoke-static {v0}, Lcom/vividsolutions/jts/geom/CoordinateArrays;->removeRepeatedPoints([Lcom/vividsolutions/jts/geom/Coordinate;)[Lcom/vividsolutions/jts/geom/Coordinate;

    move-result-object v0

    .line 276
    array-length v1, v0

    const/4 v2, 0x2

    const/4 v3, 0x1

    const/4 v4, 0x0

    if-ge v1, v2, :cond_0

    .line 277
    iput-boolean v3, p0, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->hasTooFewPoints:Z

    .line 278
    aget-object p1, v0, v4

    iput-object p1, p0, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->invalidPoint:Lcom/vividsolutions/jts/geom/Coordinate;

    return-void

    .line 284
    :cond_0
    new-instance v1, Lcom/vividsolutions/jts/geomgraph/Edge;

    new-instance v5, Lcom/vividsolutions/jts/geomgraph/Label;

    iget v6, p0, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->argIndex:I

    invoke-direct {v5, v6, v4}, Lcom/vividsolutions/jts/geomgraph/Label;-><init>(II)V

    invoke-direct {v1, v0, v5}, Lcom/vividsolutions/jts/geomgraph/Edge;-><init>([Lcom/vividsolutions/jts/geom/Coordinate;Lcom/vividsolutions/jts/geomgraph/Label;)V

    .line 285
    iget-object v5, p0, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->lineEdgeMap:Ljava/util/Map;

    invoke-interface {v5, p1, v1}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 286
    invoke-virtual {p0, v1}, Lcom/vividsolutions/jts/geomgraph/PlanarGraph;->insertEdge(Lcom/vividsolutions/jts/geomgraph/Edge;)V

    .line 292
    array-length p1, v0

    if-lt p1, v2, :cond_1

    const/4 p1, 0x1

    goto :goto_0

    :cond_1
    const/4 p1, 0x0

    :goto_0
    const-string v1, "found LineString with single point"

    invoke-static {p1, v1}, Lcom/vividsolutions/jts/util/Assert;->isTrue(ZLjava/lang/String;)V

    .line 293
    iget p1, p0, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->argIndex:I

    aget-object v1, v0, v4

    invoke-direct {p0, p1, v1}, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->insertBoundaryPoint(ILcom/vividsolutions/jts/geom/Coordinate;)V

    .line 294
    iget p1, p0, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->argIndex:I

    array-length v1, v0

    sub-int/2addr v1, v3

    aget-object v0, v0, v1

    invoke-direct {p0, p1, v0}, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->insertBoundaryPoint(ILcom/vividsolutions/jts/geom/Coordinate;)V

    return-void
.end method

.method private addPoint(Lcom/vividsolutions/jts/geom/Point;)V
    .locals 2

    .line 221
    invoke-virtual {p1}, Lcom/vividsolutions/jts/geom/Point;->getCoordinate()Lcom/vividsolutions/jts/geom/Coordinate;

    move-result-object p1

    .line 222
    iget v0, p0, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->argIndex:I

    const/4 v1, 0x0

    invoke-direct {p0, v0, p1, v1}, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->insertPoint(ILcom/vividsolutions/jts/geom/Coordinate;I)V

    return-void
.end method

.method private addPolygon(Lcom/vividsolutions/jts/geom/Polygon;)V
    .locals 4

    .line 256
    invoke-virtual {p1}, Lcom/vividsolutions/jts/geom/Polygon;->getExteriorRing()Lcom/vividsolutions/jts/geom/LineString;

    move-result-object v0

    check-cast v0, Lcom/vividsolutions/jts/geom/LinearRing;

    const/4 v1, 0x2

    const/4 v2, 0x0

    invoke-direct {p0, v0, v1, v2}, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->addPolygonRing(Lcom/vividsolutions/jts/geom/LinearRing;II)V

    const/4 v0, 0x0

    .line 261
    :goto_0
    invoke-virtual {p1}, Lcom/vividsolutions/jts/geom/Polygon;->getNumInteriorRing()I

    move-result v3

    if-ge v0, v3, :cond_0

    .line 265
    invoke-virtual {p1, v0}, Lcom/vividsolutions/jts/geom/Polygon;->getInteriorRingN(I)Lcom/vividsolutions/jts/geom/LineString;

    move-result-object v3

    check-cast v3, Lcom/vividsolutions/jts/geom/LinearRing;

    invoke-direct {p0, v3, v2, v1}, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->addPolygonRing(Lcom/vividsolutions/jts/geom/LinearRing;II)V

    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    :cond_0
    return-void
.end method

.method private addPolygonRing(Lcom/vividsolutions/jts/geom/LinearRing;II)V
    .locals 7

    .line 231
    invoke-virtual {p1}, Lcom/vividsolutions/jts/geom/LineString;->getCoordinates()[Lcom/vividsolutions/jts/geom/Coordinate;

    move-result-object v0

    invoke-static {v0}, Lcom/vividsolutions/jts/geom/CoordinateArrays;->removeRepeatedPoints([Lcom/vividsolutions/jts/geom/Coordinate;)[Lcom/vividsolutions/jts/geom/Coordinate;

    move-result-object v0

    .line 233
    array-length v1, v0

    const/4 v2, 0x0

    const/4 v3, 0x1

    const/4 v4, 0x4

    if-ge v1, v4, :cond_0

    .line 234
    iput-boolean v3, p0, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->hasTooFewPoints:Z

    .line 235
    aget-object p1, v0, v2

    iput-object p1, p0, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->invalidPoint:Lcom/vividsolutions/jts/geom/Coordinate;

    return-void

    .line 241
    :cond_0
    sget-object v1, Lcom/vividsolutions/jts/geomgraph/PlanarGraph;->cga:Lcom/vividsolutions/jts/algorithm/CGAlgorithms;

    invoke-static {v0}, Lcom/vividsolutions/jts/algorithm/CGAlgorithms;->isCCW([Lcom/vividsolutions/jts/geom/Coordinate;)Z

    move-result v1

    if-eqz v1, :cond_1

    move v6, p3

    move p3, p2

    move p2, v6

    .line 245
    :cond_1
    new-instance v1, Lcom/vividsolutions/jts/geomgraph/Edge;

    new-instance v4, Lcom/vividsolutions/jts/geomgraph/Label;

    iget v5, p0, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->argIndex:I

    invoke-direct {v4, v5, v3, p2, p3}, Lcom/vividsolutions/jts/geomgraph/Label;-><init>(IIII)V

    invoke-direct {v1, v0, v4}, Lcom/vividsolutions/jts/geomgraph/Edge;-><init>([Lcom/vividsolutions/jts/geom/Coordinate;Lcom/vividsolutions/jts/geomgraph/Label;)V

    .line 247
    iget-object p2, p0, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->lineEdgeMap:Ljava/util/Map;

    invoke-interface {p2, p1, v1}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 249
    invoke-virtual {p0, v1}, Lcom/vividsolutions/jts/geomgraph/PlanarGraph;->insertEdge(Lcom/vividsolutions/jts/geomgraph/Edge;)V

    .line 251
    iget p1, p0, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->argIndex:I

    aget-object p2, v0, v2

    invoke-direct {p0, p1, p2, v3}, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->insertPoint(ILcom/vividsolutions/jts/geom/Coordinate;I)V

    return-void
.end method

.method private addSelfIntersectionNode(ILcom/vividsolutions/jts/geom/Coordinate;I)V
    .locals 1

    .line 424
    invoke-virtual {p0, p1, p2}, Lcom/vividsolutions/jts/geomgraph/PlanarGraph;->isBoundaryNode(ILcom/vividsolutions/jts/geom/Coordinate;)Z

    move-result v0

    if-eqz v0, :cond_0

    return-void

    :cond_0
    const/4 v0, 0x1

    if-ne p3, v0, :cond_1

    .line 425
    iget-boolean v0, p0, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->useBoundaryDeterminationRule:Z

    if-eqz v0, :cond_1

    .line 426
    invoke-direct {p0, p1, p2}, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->insertBoundaryPoint(ILcom/vividsolutions/jts/geom/Coordinate;)V

    goto :goto_0

    .line 428
    :cond_1
    invoke-direct {p0, p1, p2, p3}, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->insertPoint(ILcom/vividsolutions/jts/geom/Coordinate;I)V

    :goto_0
    return-void
.end method

.method private addSelfIntersectionNodes(I)V
    .locals 4

    .line 406
    iget-object v0, p0, Lcom/vividsolutions/jts/geomgraph/PlanarGraph;->edges:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v0

    :cond_0
    invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z

    move-result v1

    if-eqz v1, :cond_1

    .line 407
    invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/vividsolutions/jts/geomgraph/Edge;

    .line 408
    invoke-virtual {v1}, Lcom/vividsolutions/jts/geomgraph/GraphComponent;->getLabel()Lcom/vividsolutions/jts/geomgraph/Label;

    move-result-object v2

    invoke-virtual {v2, p1}, Lcom/vividsolutions/jts/geomgraph/Label;->getLocation(I)I

    move-result v2

    .line 409
    iget-object v1, v1, Lcom/vividsolutions/jts/geomgraph/Edge;->eiList:Lcom/vividsolutions/jts/geomgraph/EdgeIntersectionList;

    invoke-virtual {v1}, Lcom/vividsolutions/jts/geomgraph/EdgeIntersectionList;->iterator()Ljava/util/Iterator;

    move-result-object v1

    :goto_0
    invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z

    move-result v3

    if-eqz v3, :cond_0

    .line 410
    invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Lcom/vividsolutions/jts/geomgraph/EdgeIntersection;

    .line 411
    iget-object v3, v3, Lcom/vividsolutions/jts/geomgraph/EdgeIntersection;->coord:Lcom/vividsolutions/jts/geom/Coordinate;

    invoke-direct {p0, p1, v3, v2}, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->addSelfIntersectionNode(ILcom/vividsolutions/jts/geom/Coordinate;I)V

    goto :goto_0

    :cond_1
    return-void
.end method

.method private createEdgeSetIntersector()Lcom/vividsolutions/jts/geomgraph/index/EdgeSetIntersector;
    .locals 1

    .line 113
    new-instance v0, Lcom/vividsolutions/jts/geomgraph/index/SimpleMCSweepLineIntersector;

    invoke-direct {v0}, Lcom/vividsolutions/jts/geomgraph/index/SimpleMCSweepLineIntersector;-><init>()V

    return-object v0
.end method

.method public static determineBoundary(Lcom/vividsolutions/jts/algorithm/BoundaryNodeRule;I)I
    .locals 0

    .line 77
    invoke-interface {p0, p1}, Lcom/vividsolutions/jts/algorithm/BoundaryNodeRule;->isInBoundary(I)Z

    move-result p0

    return p0
.end method

.method private insertBoundaryPoint(ILcom/vividsolutions/jts/geom/Coordinate;)V
    .locals 2

    .line 390
    iget-object v0, p0, Lcom/vividsolutions/jts/geomgraph/PlanarGraph;->nodes:Lcom/vividsolutions/jts/geomgraph/NodeMap;

    invoke-virtual {v0, p2}, Lcom/vividsolutions/jts/geomgraph/NodeMap;->addNode(Lcom/vividsolutions/jts/geom/Coordinate;)Lcom/vividsolutions/jts/geomgraph/Node;

    move-result-object p2

    .line 391
    invoke-virtual {p2}, Lcom/vividsolutions/jts/geomgraph/GraphComponent;->getLabel()Lcom/vividsolutions/jts/geomgraph/Label;

    move-result-object p2

    if-eqz p2, :cond_0

    const/4 v0, 0x0

    .line 396
    invoke-virtual {p2, p1, v0}, Lcom/vividsolutions/jts/geomgraph/Label;->getLocation(II)I

    move-result v0

    goto :goto_0

    :cond_0
    const/4 v0, -0x1

    :goto_0
    const/4 v1, 0x1

    if-ne v0, v1, :cond_1

    const/4 v1, 0x2

    .line 400
    :cond_1
    iget-object v0, p0, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->boundaryNodeRule:Lcom/vividsolutions/jts/algorithm/BoundaryNodeRule;

    invoke-static {v0, v1}, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->determineBoundary(Lcom/vividsolutions/jts/algorithm/BoundaryNodeRule;I)I

    move-result v0

    .line 401
    invoke-virtual {p2, p1, v0}, Lcom/vividsolutions/jts/geomgraph/Label;->setLocation(II)V

    return-void
.end method

.method private insertPoint(ILcom/vividsolutions/jts/geom/Coordinate;I)V
    .locals 1

    .line 374
    iget-object v0, p0, Lcom/vividsolutions/jts/geomgraph/PlanarGraph;->nodes:Lcom/vividsolutions/jts/geomgraph/NodeMap;

    invoke-virtual {v0, p2}, Lcom/vividsolutions/jts/geomgraph/NodeMap;->addNode(Lcom/vividsolutions/jts/geom/Coordinate;)Lcom/vividsolutions/jts/geomgraph/Node;

    move-result-object p2

    .line 375
    invoke-virtual {p2}, Lcom/vividsolutions/jts/geomgraph/GraphComponent;->getLabel()Lcom/vividsolutions/jts/geomgraph/Label;

    move-result-object v0

    if-nez v0, :cond_0

    .line 377
    new-instance v0, Lcom/vividsolutions/jts/geomgraph/Label;

    invoke-direct {v0, p1, p3}, Lcom/vividsolutions/jts/geomgraph/Label;-><init>(II)V

    iput-object v0, p2, Lcom/vividsolutions/jts/geomgraph/GraphComponent;->label:Lcom/vividsolutions/jts/geomgraph/Label;

    goto :goto_0

    .line 380
    :cond_0
    invoke-virtual {v0, p1, p3}, Lcom/vividsolutions/jts/geomgraph/Label;->setLocation(II)V

    :goto_0
    return-void
.end method


# virtual methods
.method public computeEdgeIntersections(Lcom/vividsolutions/jts/geomgraph/GeometryGraph;Lcom/vividsolutions/jts/algorithm/LineIntersector;Z)Lcom/vividsolutions/jts/geomgraph/index/SegmentIntersector;
    .locals 2

    .line 358
    new-instance v0, Lcom/vividsolutions/jts/geomgraph/index/SegmentIntersector;

    const/4 v1, 0x1

    invoke-direct {v0, p2, p3, v1}, Lcom/vividsolutions/jts/geomgraph/index/SegmentIntersector;-><init>(Lcom/vividsolutions/jts/algorithm/LineIntersector;ZZ)V

    .line 359
    invoke-virtual {p0}, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->getBoundaryNodes()Ljava/util/Collection;

    move-result-object p2

    invoke-virtual {p1}, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->getBoundaryNodes()Ljava/util/Collection;

    move-result-object p3

    invoke-virtual {v0, p2, p3}, Lcom/vividsolutions/jts/geomgraph/index/SegmentIntersector;->setBoundaryNodes(Ljava/util/Collection;Ljava/util/Collection;)V

    .line 361
    invoke-direct {p0}, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->createEdgeSetIntersector()Lcom/vividsolutions/jts/geomgraph/index/EdgeSetIntersector;

    move-result-object p2

    .line 362
    iget-object p3, p0, Lcom/vividsolutions/jts/geomgraph/PlanarGraph;->edges:Ljava/util/List;

    iget-object p1, p1, Lcom/vividsolutions/jts/geomgraph/PlanarGraph;->edges:Ljava/util/List;

    invoke-virtual {p2, p3, p1, v0}, Lcom/vividsolutions/jts/geomgraph/index/EdgeSetIntersector;->computeIntersections(Ljava/util/List;Ljava/util/List;Lcom/vividsolutions/jts/geomgraph/index/SegmentIntersector;)V

    return-object v0
.end method

.method public computeSelfNodes(Lcom/vividsolutions/jts/algorithm/LineIntersector;Z)Lcom/vividsolutions/jts/geomgraph/index/SegmentIntersector;
    .locals 4

    .line 330
    new-instance v0, Lcom/vividsolutions/jts/geomgraph/index/SegmentIntersector;

    const/4 v1, 0x0

    const/4 v2, 0x1

    invoke-direct {v0, p1, v2, v1}, Lcom/vividsolutions/jts/geomgraph/index/SegmentIntersector;-><init>(Lcom/vividsolutions/jts/algorithm/LineIntersector;ZZ)V

    .line 331
    invoke-direct {p0}, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->createEdgeSetIntersector()Lcom/vividsolutions/jts/geomgraph/index/EdgeSetIntersector;

    move-result-object p1

    if-nez p2, :cond_1

    .line 333
    iget-object p2, p0, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->parentGeom:Lcom/vividsolutions/jts/geom/Geometry;

    instance-of v3, p2, Lcom/vividsolutions/jts/geom/LinearRing;

    if-nez v3, :cond_0

    instance-of v3, p2, Lcom/vividsolutions/jts/geom/Polygon;

    if-nez v3, :cond_0

    instance-of p2, p2, Lcom/vividsolutions/jts/geom/MultiPolygon;

    if-eqz p2, :cond_1

    .line 337
    :cond_0
    iget-object p2, p0, Lcom/vividsolutions/jts/geomgraph/PlanarGraph;->edges:Ljava/util/List;

    invoke-virtual {p1, p2, v0, v1}, Lcom/vividsolutions/jts/geomgraph/index/EdgeSetIntersector;->computeIntersections(Ljava/util/List;Lcom/vividsolutions/jts/geomgraph/index/SegmentIntersector;Z)V

    goto :goto_0

    .line 340
    :cond_1
    iget-object p2, p0, Lcom/vividsolutions/jts/geomgraph/PlanarGraph;->edges:Ljava/util/List;

    invoke-virtual {p1, p2, v0, v2}, Lcom/vividsolutions/jts/geomgraph/index/EdgeSetIntersector;->computeIntersections(Ljava/util/List;Lcom/vividsolutions/jts/geomgraph/index/SegmentIntersector;Z)V

    .line 343
    :goto_0
    iget p1, p0, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->argIndex:I

    invoke-direct {p0, p1}, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->addSelfIntersectionNodes(I)V

    return-object v0
.end method

.method public getBoundaryNodeRule()Lcom/vividsolutions/jts/algorithm/BoundaryNodeRule;
    .locals 1

    .line 156
    iget-object v0, p0, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->boundaryNodeRule:Lcom/vividsolutions/jts/algorithm/BoundaryNodeRule;

    return-object v0
.end method

.method public getBoundaryNodes()Ljava/util/Collection;
    .locals 2

    .line 160
    iget-object v0, p0, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->boundaryNodes:Ljava/util/Collection;

    if-nez v0, :cond_0

    .line 161
    iget-object v0, p0, Lcom/vividsolutions/jts/geomgraph/PlanarGraph;->nodes:Lcom/vividsolutions/jts/geomgraph/NodeMap;

    iget v1, p0, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->argIndex:I

    invoke-virtual {v0, v1}, Lcom/vividsolutions/jts/geomgraph/NodeMap;->getBoundaryNodes(I)Ljava/util/Collection;

    move-result-object v0

    iput-object v0, p0, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->boundaryNodes:Ljava/util/Collection;

    .line 162
    :cond_0
    iget-object v0, p0, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->boundaryNodes:Ljava/util/Collection;

    return-object v0
.end method

.method public getGeometry()Lcom/vividsolutions/jts/geom/Geometry;
    .locals 1

    .line 154
    iget-object v0, p0, Lcom/vividsolutions/jts/geomgraph/GeometryGraph;->parentGeom:Lcom/vividsolutions/jts/geom/Geometry;

    return-object v0
.end method
